#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
///**
// * ${copyright}
// * Copyright (c) 2019. All Rights Reserved.
// */
//package ${package}.common.component.feign;
//
//import feign.RequestInterceptor;
//import feign.RequestTemplate;
//import org.springframework.stereotype.Component;
//import org.springframework.web.context.request.RequestContextHolder;
//import org.springframework.web.context.request.ServletRequestAttributes;
//
//import javax.servlet.http.HttpServletRequest;
//import java.util.Objects;
//
///**
// * Description: fegin模块间调用的问题
// *
// * @author wupanhua
// * @date 2019/8/6 15:28
// *
// * <pre>
// *              ${copyright}
// *      Copyright (c) 2019. All Rights Reserved.
// * </pre>
// */
//@Component
//public class FeignInterceptor implements RequestInterceptor {
//
//    /**
//     * Description:
//     * <无法补充>
//     * @author wupanhua
//     * @date 15:21 2019/8/8
//     * @param requestTemplate 1
//     **/
//    @Override
//    public void apply(RequestTemplate requestTemplate) {
//        // 设置身份认证头
//        setAuthorizationToken(requestTemplate);
//    }
//
//    /**
//     * Description:
//     * <在Http 请求头中放入身份认证token信息>
//     * @author wupanhua
//     * @date 14:30 2020-06-10
//     * @param requestTemplate 请求
//     * @return void
//     **/
//    private void setAuthorizationToken(RequestTemplate requestTemplate) {
//        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
//        if(Objects.nonNull(attributes)) {
//            HttpServletRequest request = attributes.getRequest();
//            // 添加token
//            requestTemplate.header("Authorization", request.getHeader("Authorization"));
//        }
//    }
//
//}
